CREATE TABLE [dbo].[TDBANC_CTCO]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_BANC] [dbo].[TD_VC_003] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[NU_CNTA_BANC] [dbo].[TD_VC_020] NOT NULL,
[AA_BNCO] [dbo].[TD_VC_004] NOT NULL,
[MM_BNCO] [dbo].[TD_VC_002] NOT NULL,
[TI_MOVI_BANC] [dbo].[TD_VC_001] NOT NULL,
[NU_COMP_BANC] [dbo].[TD_VC_008] NOT NULL,
[NU_PLAC] [dbo].[TD_VC_010] NOT NULL,
[CO_TIPO_ENTI] [dbo].[TD_VC_001] NULL,
[CO_ENTI] [dbo].[TD_VC_020] NULL,
[DE_ENTI] [dbo].[TD_VC_100] NULL,
[NU_KILO_ANTE] [dbo].[TD_VC_010] NULL,
[NU_KILO_RECO] [dbo].[TD_VC_010] NULL,
[DE_DOCU] [dbo].[TD_VC_050] NULL,
[IM_VEHI] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDBANC_CT__IM_VE__7D98A078] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDBANC_CT__CO_US__7E8CC4B1] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDBANC_CT__FE_US__7F80E8EA] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDBANC_CT__CO_US__00750D23] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDBANC_CT__FE_US__0169315C] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDBANC_CTCO] ADD CONSTRAINT [PK__TDBANC_C__4B5D98097365F61F] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_BANC], [CO_UNID_CONC], [NU_CNTA_BANC], [AA_BNCO], [MM_BNCO], [TI_MOVI_BANC], [NU_COMP_BANC], [NU_PLAC]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDBANC_CTCO] ADD CONSTRAINT [FK__TDBANC_CTCO__28B8D3FE] FOREIGN KEY ([CO_EMPR], [CO_BANC], [CO_UNID_CONC], [NU_CNTA_BANC], [AA_BNCO], [MM_BNCO], [TI_MOVI_BANC], [NU_COMP_BANC]) REFERENCES [dbo].[TCMOVI_BANC] ([CO_EMPR], [CO_BANC], [CO_UNID_CONC], [NU_CNTA_BANC], [AA_BNCO], [MM_BNCO], [TI_MOVI_BANC], [NU_COMP_BANC])
GO
